<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>我爱预约网商户页面</title>


<!--css文件-->

	<!--bootstrap_css文件-->
	<link rel="stylesheet" href="/wayy1/Public/bootstrap/dist/css/bootstrap.min.css">

	<link href="/wayy1/Application/Home/View/Public/Css/basic.css" rel="stylesheet" type="text/css" />

	<!--easyui_css文件-->
	<link href="/wayy1/Public/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
	<link href="/wayy1/Public/easyui/themes/icon.css" rel="stylesheet" type="text/css" />	

<!--js文件-->

	<script src="/wayy1/Public/bootstrap/js/jquery.min.js"></script>
	<script src="/wayy1/Public/bootstrap/js/bootstrap.min.js"></script>
	<script src="/wayy1/Public/bootstrap/js/holder.min.js"></script>
	<script src="/wayy1/Public/bootstrap/js/application.js"></script>
	<script type="text/javascript" src="/wayy1/Public/bootstrap/js/jquery.easyui.min.js"></script>



	<!--<script type="text/javascript" src="/wayy1/Public/easyui/jquery.min.js"></script>-->
	<script type="text/javascript" src="/wayy1/Public/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="/wayy1/Public/easyui/locale/easyui-lang-zh_CN.js" ></script>
	<script src='/wayy1/Application/Home/View/Public/Js/basic.js'></script>	
	<script src="/wayy1/Public/area.min.js"></script>	





	<!--字模板中包含文件放置区块名称-->

    
  <link href="/wayy1/Application/Home/View/Public/Css/Shop/shop.css" rel="stylesheet" type="text/css" />   

  <script src='/wayy1/Application/Home/View/Public/Js/Shop/shop.js'></script>

       <script type="text/javascript">
        function convert(rows){
            function exists(rows, pid){
                for(var i=0; i<rows.length; i++){
                    if (rows[i].id == pid) return true;
                }
                return false;
            }
            
            var nodes = [];
            // get the top level nodes
            for(var i=0; i<rows.length; i++){
                var row = rows[i];
                if (!exists(rows, row.pid)){
                    nodes.push({
                        id:row.id,
                        text:row.name
                    });
                }
            }
            
            var toDo = [];
            for(var i=0; i<nodes.length; i++){
                toDo.push(nodes[i]);
            }
            while(toDo.length){
                var node = toDo.shift();    // the parent node
                // get the children nodes
                for(var i=0; i<rows.length; i++){
                    var row = rows[i];
                    if (row.pid == node.id){
                        var child = {id:row.id,text:row.name};
                        if (node.children){
                            node.children.push(child);
                        } else {
                            node.children = [child];
                        }
                        toDo.push(child);
                    }
                }
            }
            return nodes;
        }
        
        $(function(){
            $('#tt').tree({
                url: '<?php echo U('Shop/tree');?>',
                loadFilter: function(rows){
                    return convert(rows);
                }
            });
        });

        $(function(){
          // $('#tt').tree({
          //   onClick: function(node){
          //     $(this).tree('toggle', node.target);

          //   }
          // });

            // $('#tt').tree({  
            //             checkbox: false,  
            //             dnd:true,  
            //             url: webContext+"/menu/getTemplateMenuItemChild.do?id=0",  
            //             onClick:function(node)  
            //         }  
             // $('#tt').tabs('add',{
             //    title: 'Tab'+index,
             //    closable: true,
             //    href:'tabposition.html' // url
             //    });
             var _tabPanel=$("#menucontent");


            $('#tt').tree({ 
              onClick: function(node){ 
                  if($('#tt').tree('isLeaf',node.target)){

                    // alert(1); 
                    // alert(node.id);
                    var nodeid=node.id;
                    // alert(nodeid);

                    var url="/wayy1/index.php/Home/Shop/shopmenusearch/"+'id/'+'<?php echo ($id); ?>'+'/nodeid/'+nodeid;
                    // U('Blog/cate',array('cate_id'=>1,'status'=>1))
                    var title=node.text;
                    // alert(node.text);
                    // alert(url);
                    // alert(title);

                     if(url!=="#"&&url!==""){
                       // alert(2);
                      if(!_tabPanel.tabs('exists',title)){
                        // alert(3);
                          _tabPanel.tabs('add',{
                                             title:title,
                                             content:'<iframe src="'+url+'" style="padding:0;margin:0;border:0;width:100%;height:100%;"></iframe>',
                                             closable:true});
                          bindfresh(title);
                    }else{
                      // alert(5);
                      _tabPanel.tabs('select',title);
                    }
                  }
                    
                      
                } 
              } 
            });
            window.document.addTab=function(url,title){
                  var _tabPanel=$("#menucontent");
                  if(!_tabPanel.tabs('exists',title)){
                  _tabPanel.tabs('add',{
                    title:title,
                    content:'<iframe src="'+url+'" style="padding:0;margin:0;border:0;width:100%;height:100%;"></iframe>',
                    closable:true});
                bindfresh(title);
                  }else{
                _tabPanel.tabs('select',title);
                  }
            }//end window.document.addTab


             function wopen(url){window.open (url,'newwindow','height=800,width=1100,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')}
              function bindfresh(title){
              /*双击刷新TAB选项卡*/
                $(".tabs-inner").dblclick(function(){
                    var _ctab=$('#main').tabs('getTab',title);
                    var html=_ctab.html();
                    _ctab.html(html);
                });//end $(".tabs-inner").dblclick
              }

        });

</script>

  








</head>
<body>
<div class="row col-md-12">
<!--网页头部-->
		<div class="row col-md-12 header_top">
			<div class="col-md-8">
				<span >您好！<?php echo $_SESSION['username'] ?>欢迎光临我爱预约网！</span>
			</div>			
			<div class="col-md-4">
				  <?php if($_SESSION['username'] == ''): ?><a class="login" href="<?php echo U('User/index');?>"> 登录 |</a>
				  	<a class="registe" href="<?php echo U('User/registe');?>"> 免费注册 |</a>
                          
                  <?php else: ?>
                  <a class="logout" href="<?php echo U('User/logout');?>"> 退出 |</a>
                  <a class="usercenter" href="<?php echo U('User/usercenter');?>"> 个人中心 |</a><?php endif; ?>  			
				<a href="#"> 我的约单 |</a>
			
				<a href="<?php echo U('User/service');?>"> 客户服务 </a> 
			</div>
		</div>
		<div class="row col-md-12 logo_and_search">
			
			<div class="col-md-7">
				<div class="col-md-12">
					<a class="wayy_logo" href="<?php echo U('Index/index');?>"><img  src="/wayy1/Application/Home/View/Public/Images/logo.jpg" width="154" height="90" /></a> 
					
				</div>
				<div class="col-md-12">

					<form id="destination_box" action="<?php echo U('Index/test');?>" method="post">
					<div class="input-group">						
				     <script type="text/javascript"> 
                          var area = new AreaCtrl("省份:","城市:","地区:");
                          area.write();
                          area.loadData();
                	</script> 	
				      <span class="input-group-btn">
				        <button class="btn btn-default  gosearch2" type="submit">Go!</button>
				      </span>
				    </div><!-- /input-group -->	
				</form>						
				</div>			 
						
				
			</div>
			<!--
			<div class="col-md-3 city_list">
				



				
				<input id="city_box" type="text" value="beijing">

					<div id="city">
						<div style="background:#eee;padding:5px;">请选择您想找服务所在的城市</div>
						<div class="padding:5px;">
							<input type="radio" name="city" value="01"><span>北京</span><br>
							<input type="radio" name="city" value="02"><span>上海</span><br>
							<input type="radio" name="city" value="03"><span>深圳</span><br>
							<input type="radio" name="city" value="04"><span>西安</span><br>
							<input type="radio" name="city" value="05"><span>其他</span><br>
						</div>
					</div>
				
			</div>	
			-->
			<div class="col-md-5 search_area">
				<div class="col-md-12">
					<button class="btn btn-default search_button search_shop" type="button">商家</button>
				<button class="btn btn-default search_button search_service" type="button">菜品</button>
				<span class="search_box_mess" style="color:red;display: none">*请输入查询关键字</span>
					

				</div>
				<div class="col-md-12">
					<form id="shop_search_box" action="<?php echo U('Shop/shopsearch');?>" method="post">
					<div class="input-group">						
				      <input type="text" name="keyword" class="form-control col-md-2 gosearch gosearch1keyword" placeholder="请输入要查找的商家..">
				      <span class="input-group-btn">
				        <button class="btn btn-default  gosearch1" type="submit">Go!</button>
				      </span>
				    </div><!-- /input-group -->	
				</form>
				<form id="service_search_box" style="display: none;" action="<?php echo U('Shop/service');?>" method="post">
					<div class="input-group">						
				      <input type="text" name="keyword"  class="form-control col-md-2 gosearch gosearch2keyword" placeholder="请输入要查找的菜品..">
				      <span class="input-group-btn">
				        <button class="btn btn-default  gosearch2" type="submit">Go!</button>
				      </span>
				    </div><!-- /input-group -->	
				</form>	
					

				</div>
				
								
				
				<!--<div id="ss"></div>

				<div id="box">
					<div data-options="iconCls:'icon-ok'">商铺</div>					
					<div data-options="iconCls:'icon-ok'" name="sports">服务</div>
					<div id="action" name="<?php echo U('Shop/shopsearch');?>" value="<?php echo U('Shop/shopservice');?>">
					</div>
				</div>	
			-->

			</div>
			
				

		</div>	
	<div class="row col-md-12 nav_main">
		<div class="col-md-3">
			<h4>全部服务分类</h4>
		</div>
		<div class="col-md-2">
			<h4><a href="<?php echo U('Index/index');?>">首页</a></h4>
		</div>
		<div class="col-md-3">
			<h4><a href="<?php echo U('Shop/addshop');?>">添加服务商获取积分</a></h4>
		</div>
		<div class="col-md-4">
			<h4>预约服务:免费_快捷_优惠_积分</h4>
		</div>
	</div>

<!--网页主要内容区-->

	<div class="main_content col-md-12">
			
				

    <div class="row">

      <ol class="col-md-12 breadcrumb text-left">
        <li><a href="<?php echo U('Index/Index');?>">首页</a></li>
        <li><a href="#">美食</a></li>
        <li class="active">商家</li>
      </ol>

 <!--店铺简介-->
      <div class="col-md-9 shop_info">
        <div class="col-md-4 shop_album">
          <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                <!-- Indicators -->
                <ol class="carousel-indicators">
                   <?php if($ispic == 1 ): if(is_array($shop_pics)): $i = 0; $__LIST__ = $shop_pics;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($key == 0): ?><li data-target="#carousel-example-generic" data-slide-to="$key" class="active"></li>
                          <?php else: ?>
                            <li data-target="#carousel-example-generic" data-slide-to="$key"></li><?php endif; endforeach; endif; else: echo "" ;endif; ?>                                  

                    <?php else: ?>
                          <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                          <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                          <li data-target="#carousel-example-generic" data-slide-to="2"></li><?php endif; ?> 

                 
                </ol>

                <!-- Wrapper for slides -->
                <div class="carousel-inner" role="listbox"> 
                   <?php if($ispic == 1 ): if(is_array($shop_pics)): $i = 0; $__LIST__ = $shop_pics;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($key == 0): ?><div class="item active">
                              <img src="/wayy1<?php echo ($vo["shop_pic_path"]); echo ($vo["shop_pic_name"]); ?>">
                              <div class="carousel-caption">                      
                                 <h3>图片标题</h3>
                                 <p>说明</p>
                              </div>
                            </div>
                          <?php else: ?>
                          <div class="item">
                              <img src="/wayy1<?php echo ($vo["shop_pic_path"]); echo ($vo["shop_pic_name"]); ?>">
                              <div class="carousel-caption">
                                  <h3>图片标题</h3>
                                  <p>说明</p>
                              </div>
                          </div><?php endif; endforeach; endif; else: echo "" ;endif; ?>                                  

                    <?php else: ?>
                         <div class="item active">
                            <img src="holder.js/200x200">
                            <div class="carousel-caption">                      
                               <h3>没有图片</h3>
                               <p>欢迎上传</p>
                            </div>
                          </div>
                          <div class="item">
                              <img src="holder.js/200x200">
                              <div class="carousel-caption">
                                     <h3>上传图片</h3>
                                     <p>获得积分</p>
                              </div>
                          </div> 
                           <div class="item">
                              <img src="holder.js/200x200">
                              <div class="carousel-caption">
                                     <h3>上传图片</h3>
                                     <p>获得积分</p>
                              </div>
                          </div><?php endif; ?>                         
                 
                </div>

                <!-- Controls -->
                <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                  <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                  <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                  <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                  <span class="sr-only">Next</span>
                </a>
              </div>
              <a href="<?php echo U('Shop/addshoppic',array('id'=>$id));?>" class="btn btn-success" role="button">为商铺添加图片</a>



        </div>
        <div class="col-md-8 shop_info_text">
            <div class="col-md-2">
              <img src="holder.js/20x20">                
            </div>
            <div class="col-md-10">
            <h4 class="pull-left"><?php echo ($shop_name); ?></h4>
            <img src="holder.js/10x10">
            <img src="holder.js/10x10">
            <img src="holder.js/10x10">
            <a href="###">收藏店铺</a>
            </div>

          <p><?php echo (htmlspecialchars_decode( $shop_introduction)); ?></p>

              <div class="col-md-8">
                <div class="col-md-12"><strong>总评：<?php echo ($shop_service_satisfaction); ?></strong></div>
                <div class="col-md-12"><strong>人均消费：<?php echo ($shop_average_spend); ?>环境：<?php echo ($shop_environment); ?>服务:<?php echo ($shop_service); ?></strong></div>
                <div class="col-md-12"><strong>电话：<?php echo ($shop_telephone); ?>营业时间：<?php echo ($shop_open_time); ?></strong></div>
                <div class="col-md-12">
                  <img src="holder.js/20x20">
                  <img src="holder.js/20x20">
                  <img src="holder.js/20x20">
                </div>
               
              </div>
              <div class="col-md-4 shop_user_remark">
                <div class="col-md-12"><strong>总评：<?php echo ($shop_service_satisfaction); ?></strong></div>
                <div class="col-md-12"><strong><?php echo ($shop_feedback_rate); ?>用户推荐</strong></div>
                <div class="col-md-12"><strong><?php echo ($shop_remark_num); ?>个用户点评</strong></div>
              </div>

              <div class="col-md-10">
              <a href="#" class="btn btn-success active" role="button">预约</a>
              <a href="#" class="btn btn-success active" role="button">外卖</a>
              <a href="#" class="btn btn-success active" role="button">团购</a>
              <a href="#" class="btn btn-success active" role="button">我来点评</a>
              </div>
        </div>

        </div>
 <!--地图-->
      <div class="col-md-3 shop_map">
        <img src="holder.js/203x240">
      </div>

 <!--店铺详细信息-->
      <div class="col-md-9 shop_details">
        <div id="tab">
            <ul class="tab_menu">
                <li class="selected">餐厅详情</li>
                  <li>餐桌</li>
                  <li>菜单</li>
                  <li>外卖</li>
                  <li>团购</li>
                  <li>订单记录</li>
                  <li>餐厅点评</li> 
              </ul>
              <div class="tab_box">
                  <div>
                      <?php echo (htmlspecialchars_decode( $shop_details)); ?>
                      <a href="<?php echo U('Shop/addshopdetail',array('id'=>$id));?>" class="btn btn-success" role="button">更新详细信息</a>
                  </div>

                  <div style="display:none">
                    <a href="<?php echo U('shopcenter',array('id'=>$id));?>" class="btn btn-success" role="button">更新餐桌详细细信息</a>
                  </div>
                  <div style="display:none">

                    <div class="row">
                      <div class="col-md-2">
                        <ul id="tt"></ul>

                      </div>
                      

                      <div id="menucontent" class="easyui-tabs col-md-10">

                        <div title="全部菜单项" style="padding:10px;">
                          <iframe  frameborder="0" style="padding:0;margin:0;border:0;width:100%;height:100%;" src="<?php echo U('Shop/shopmenusearch',array('id'=>$id));?>"></iframe>
                        </div>

                        
                      </div>
                    </div> 
                    <div class='row'>
                       <a href="<?php echo U('shopcenter',array('id'=>$id));?>" class="btn btn-success" role="button">更新菜单详细细信息</a>
                      
                    </div> 
                  </div>
                  <div style="display:none">
                    <a href="<?php echo U('Shop/addshopdetail',array('id'=>$id));?>" class="btn btn-success" role="button">更新外卖详细细信息</a>
                  </div>
                  <div style="display:none">团购的内容</div>
                  <div style="display:none">订单的记录</div>
                  <div style="display:none">点评的内容</div>
              </div>
        </div>
        店铺详细信息
      </div>
  <!--电话，地图和优惠信息-->
      <div class="col-md-3 shop_tel_order_preferential">
        <div class="col-md-12 shop_tel">
        <span>预约电话1：<?php echo ($shop_telephone); ?></span>
        <span>预约电话2：<?php echo ($shop_phone); ?></span>
        <span>地址：<?php echo ($shop_address); ?></span>
        

        </div>
        <div class="col-md-12 shop_order">
        订单
        

        </div>
        <div class="col-md-12 shop_preferential">
        优惠信息
        

        </div>


      </div>


    </div>

  
	</div>
<!--网页底部-->

	<hr/>  

	<div class="footer col-md-12">
		<div class="copyright">
               Copyright &copy; 2013-2023 woaiyuyue.com 版权所有
         
        </div>
			
	</div>
</div>

</body>
</html>